package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;


import java.io.Serializable;
import java.time.LocalDateTime;
@Getter
@Setter
@NoArgsConstructor
@TableName(value = "tb_resource")
public class Resource implements Serializable {

    @TableId(type = IdType.AUTO)
    private  Integer id ;
    @TableField(value = "resource_title")
    private String  resourceTitle;
    @TableField(value = "resource_url")
    private String resourceUrl;
    @TableField(value = "pic_url")
    private String picUrl;
    @TableField(value = "major_id")
    private Integer majorId;
    //@TableField(exist = false)//表示当前属性不是数据库的字段
    @TableField(value = "create_date")
    private LocalDateTime createDate;

    @TableField(exist =false)
    private Major major;

}
